{% extends "base.html" %}

{% block extra_js %}
<script>$(showForm);</script>
{% endblock %}

{% block main %}
{% for game in games %}
<div class="room">
    <h1><a href="{% url 'game' game.id %}"> Partida {{ game.id }} </a></h1>

</div>
{% empty %}
<p>There are currently no games! Add one below.</p>
{% endfor %}
<br clear="all">
{% endblock %}

{% block form %}
<form method="post" action="{% url 'create' %}">
    <input type="text" id="name" name="name">
    <input type="submit" id="submit" value="Add Game">
    {% csrf_token %}
</form>
{% endblock %}
